#include "register.h"



//salt生成
char * salt(){
    char s[13] = {"$6$00000000$"};
    srand(time(NULL));
    for (int i = 3; i < 12; i++)
    {
        int key;
        while(1){
            key = rand()%(122-47);
            if(!(9 < key && key < 17) && !(42 < key && key < 49))
                break;
        }
        s[i] = key+48;
    }
    char s[12] = '\0';
    debug_log("salt:");
    debug_log(s);
    return s;
}